// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

namespace FluentHub.Octokit.Models.v4
{
	/// <summary>
	/// A Dependabot alert for a repository with a dependency affected by a security vulnerability.
	/// </summary>
	public class RepositoryVulnerabilityAlert
	{
		/// <summary>
		/// When was the alert auto-dismissed?
		/// </summary>
		public DateTimeOffset? AutoDismissedAt { get; set; }

		/// <summary>
		/// Humanized string of "When was the alert auto-dismissed?"
		/// <summary>
		public string AutoDismissedAtHumanized { get; set; }

		/// <summary>
		/// When was the alert created?
		/// </summary>
		public DateTimeOffset CreatedAt { get; set; }

		/// <summary>
		/// Humanized string of "When was the alert created?"
		/// <summary>
		public string CreatedAtHumanized { get; set; }

		/// <summary>
		/// The associated Dependabot update
		/// </summary>
		public DependabotUpdate DependabotUpdate { get; set; }

		/// <summary>
		/// The scope of an alert's dependency
		/// </summary>
		public RepositoryVulnerabilityAlertDependencyScope? DependencyScope { get; set; }

		/// <summary>
		/// Comment explaining the reason the alert was dismissed
		/// </summary>
		public string DismissComment { get; set; }

		/// <summary>
		/// The reason the alert was dismissed
		/// </summary>
		public string DismissReason { get; set; }

		/// <summary>
		/// When was the alert dismissed?
		/// </summary>
		public DateTimeOffset? DismissedAt { get; set; }

		/// <summary>
		/// Humanized string of "When was the alert dismissed?"
		/// <summary>
		public string DismissedAtHumanized { get; set; }

		/// <summary>
		/// The user who dismissed the alert
		/// </summary>
		public User Dismisser { get; set; }

		/// <summary>
		/// When was the alert fixed?
		/// </summary>
		public DateTimeOffset? FixedAt { get; set; }

		/// <summary>
		/// Humanized string of "When was the alert fixed?"
		/// <summary>
		public string FixedAtHumanized { get; set; }

		/// <summary>
		/// The Node ID of the RepositoryVulnerabilityAlert object
		/// </summary>
		public ID Id { get; set; }

		/// <summary>
		/// Identifies the alert number.
		/// </summary>
		public int Number { get; set; }

		/// <summary>
		/// The associated repository
		/// </summary>
		public Repository Repository { get; set; }

		/// <summary>
		/// The associated security advisory
		/// </summary>
		public SecurityAdvisory SecurityAdvisory { get; set; }

		/// <summary>
		/// The associated security vulnerability
		/// </summary>
		public SecurityVulnerability SecurityVulnerability { get; set; }

		/// <summary>
		/// Identifies the state of the alert.
		/// </summary>
		public RepositoryVulnerabilityAlertState State { get; set; }

		/// <summary>
		/// The vulnerable manifest filename
		/// </summary>
		public string VulnerableManifestFilename { get; set; }

		/// <summary>
		/// The vulnerable manifest path
		/// </summary>
		public string VulnerableManifestPath { get; set; }

		/// <summary>
		/// The vulnerable requirements
		/// </summary>
		public string VulnerableRequirements { get; set; }
	}
}
